﻿using System.Collections;
using System.Linq;

public static class IEnumIQueryExtensions
    {
        public static string TransToString(this IEnumerable array,bool ToHtml)
        {
            System.Text.StringBuilder strb=new System.Text.StringBuilder();
            foreach (object o in array)
                strb.Append(o.ToString() + (ToHtml?"<br/>":"\n"));
            return strb.ToString();
        }
        public static string TransToString(this IQueryable array, bool ToHtml)
        {
            System.Text.StringBuilder strb = new System.Text.StringBuilder();
            foreach (object o in array)
                strb.Append(o.ToString() + (ToHtml ? "<br/>" : "\n"));
            return strb.ToString();
        }
    }
    

